package com.dzsw.duplicatedata;

import java.util.List;
import java.util.stream.Collectors;

/**
 * stream去重
 *
 * @author sunz
 * @version 1.0
 * @CreateTime 2021-04-21-16:25
 */
public class StreamMain {

    public static void main(String[] args) {
        List<SampleBean> list = DuplicateDataHelper.getData();
        list = list.stream().distinct().collect(Collectors.toList());
        list.forEach(item -> {
            System.out.println(item.toString());
        });
    }
}
